// TOWN DIALOGUE SCRIPT
//    Town 6: Asner

// This is the dialogue for this town.
// You can use states numbered from 1 to 99.

begintalkscript;

variables;

short choice;

// *** Carrie ***
begintalknode 1;
	state = -1;
	personality = 606;
	nextstate = 2;
	condition = 1;
	question = "Carrie";
	text1 = "An attractive woman with blond-hair is tallying up reciepts behind the counter.";
	text2 = "She looks up to you and says _Hi, I'm Carrie, can I interest you in some potions?_";
	text5 = "Carrie looks up from crushing some herbs and smiles at you.";
	text6 = "_Do you need some potions for your travels?_ she asks.";
	action = INTRO;

begintalknode 2;
	state = 2;
	personality = 606;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Carrie gives a little giggle and answers _I make several potions for the needy traveler._";
	text2 = "_I have a vast array of potions available. Can I show you some?_ she asks.";

begintalknode 3;
	state = 2;
	personality = 606;
	nextstate = -1;
	condition = 1;
	question = "What are you doing later?";
	text1 = "Carrie smiles at you and says _Sorry, I already have plans, perhaps some other time._";
	text2 = "She adds _Do you want to look at my potions?_";

begintalknode 4;
	state = 2;
	personality = 606;
	nextstate = -1;
	condition = 1;
	question = "You don't have issues with an herb shop next door?";
	text1 = "Carrie laughs _Wanda is my sister._";
	text2 = "_Of course I don't have issues with her being next door._";
	text3 = "_Besides, it gives me a good supply of herbs to make my hand-made potions with._";

begintalknode 5;
	state = 2;
	personality = 606;
	nextstate = -1;
	condition = 1;
	question = "Can I see your potions?";
	text1 = "You finish buying Carrie's potions.";
	code = 
		begin_shop_mode("Carrie's Potions", "Carrie has a fine selection of hand-made potions available for sale.  Prices are so-so.", 13, 3, -1);
	break;

// *** Wanda ***
begintalknode 10;
	state = -1;
	personality = 607;
	nextstate = 11;
	condition = 1;
	question = "Wanda";
	text1 = "An attractive woman with dark-hair is chopping up some herbs behind the counter.";
	text2 = "She looks up to you and says _Hi, I'm Wanda, can I interest you in some herbs?_";
	text5 = "Wanda looks up from packaging some herbs into bags and smiles at you.";
	text6 = "_Do you need to purchase some herbs for your travels?_ she asks.";
	action = INTRO;

begintalknode 11;
	state = 11;
	personality = 607;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Wanda answers _I sell herbs for people to use in potion making._";
	text2 = "_I have a small patch that I grow herbs in across the road._";
	text3 = "She smiles _It keeps me busy._";

begintalknode 12;
	state = 11;
	personality = 607;
	nextstate = -1;
	condition = 1;
	question = "What are you doing later?";
	text1 = "Wanda smiles _I'm sorry, I have other plans currently.  Maybe some other time._";
	text2 = "She adds _Can I interest you in some herbs?_";

begintalknode 13;
	state = 11;
	personality = 607;
	nextstate = -1;
	condition = 1;
	question = "The potion shop next door doesn't mind that you are here?";
	text1 = "Wanda laughs _The potion shop is owned by my sister._";
	text2 = "_I supply her with herbs, she creates potions for people to buy._";
	text3 = "Wanda asks _Could I interest you in some herbs?_";

begintalknode 14;
	state = 11;
	personality = 607;
	nextstate = -1;
	condition = 1;
	question = "I can see your herbs?";
	text1 = "You finish buying Wanda's herbs.";
	code =
		begin_shop_mode("Wanda's Herbs", "Wanda has a large selection of home-grown herbs available for sale.  Prices are not too bad.", 12, 3, -1);
	break;

// *** Jennie ***
begintalknode 20;
	state = -1;
	personality = 608;
	nextstate = 21;
	condition = 1;
	question = "Jennie";
	text1 = "A red-hair woman is pacing around the inside of the house.";
	text2 = "She looks a little shocked to see you in the house.";
	text3 = "When she realizes you mean her no harm, she asks _What are you doing in my house._";
	text5 = "Jennie stops pacing around and looks at you.";
	text6 = "_What do you want?_ she asks.";
	action = INTRO;

begintalknode 21;
	state = 21;
	personality = 608;
	nextstate = -1;
	condition = get_flag(6, 2) == 0;
	question = "What is you name?";
	text1 = "She seems resigned to your presence, _My name is Jennie._";
	text2 = "She seems a little sad, and not just because you barged into her house.";
	code =
		set_flag(6, 2, 1);
	break;

begintalknode 22;
	state = 21;
	personality = 608;
	nextstate = 24;
	condition = ((get_flag(6, 2) > 0) && (get_flag(50, 7) == 0));
	question = "Why are you so sad?";
	text1 = "Jennie looks like she won't answer, but instead says _I'm sorry._";
	text2 = "_I've lost the candle stick my husband gave me before he was killed by that she-devil._";
	text3 = "_A few days ago, some bandits broke in and stole it._";
	text4 = "_I'm afraid I'll never see it again._";
	text5 = "_You haven't found it yet have you?_ she asks.";
	code =
		if (get_flag(50, 6) == 0)
			remove_string(5);
	break;

begintalknode 23;
	state = 21;
	personality = 608;
	nextstate = -1;
	condition = get_flag(50, 7) > 0;
	question = "Sorry to bother you.";
	text1 = "Jennie smiles _That's OK, thank you again for returning my candlestick._";
	action = END_TALK;

begintalknode 24;
	state = 24;
	personality = 608;
	nextstate = -1;
	condition = get_flag(50, 6) == 0;
	question = "I can find it for you.";
	text1 = "Jennie breaks out in a smile _Would you, oh thank you._";
	text2 = "_I've heard that the bandits have a hideout somewhere in the Cresent Bowl region._";
	action = END_TALK;
	code =
		set_flag(50, 6, 1);
		toggle_quest(3, 1);
	break;

begintalknode 25;
	state = 24;
	personality = 608;
	nextstate = -1;
	condition = ((get_flag(50, 6) > 0) && (has_special_item(4) == 0));
	question = "No, I haven't found it yet.";
	text1 = "Jennie gets sadder and turns away from you.";
	text2 = "_Oh well, thank you for trying anyway._ she says before breaking off the conversation.";
	action = END_TALK;

begintalknode 26;
	state = 24;
	personality = 608;
	nextstate = -1;
	condition = ((get_flag(50, 6) > 0) && (has_special_item(4) > 0));
	question = "Yes, I have found it.";
	text1 = "Jennie starts crying tears of joy.";
	text2 = "_Oh thank you._ she says through the emotions pouring out of her.";
	text3 = "She wipes her eyes as she accepts the candlestick saying _I can't give you anything but my gratitude._";
	text4 = "You are just happy you were able to help.";
	action = END_TALK;
	code =
		take_special_item(4);
		set_flag(50, 7, 1);
		toggle_quest(3, 0);
		award_party_xp(40, 25);
	break;

// *** Father Ian ***
begintalknode 30;
	state = -1;
	personality = 237;
	nextstate = 31;
	condition = 1;
	question = "Father Ian";
	text1 = "A priest is busy tending to the needs of the village up by the alter.";
	text2 = "He smiles as he sees you saying _Hello children, I'm Father Ian._";
	text3 = "_Do you need healing?_";
	text5 = "Father Ian smiles as you approach.";
	text6 = "_Hello again my children, do you require healing?_";
	action = INTRO;

begintalknode 31;
	state = 31;
	personality = 237;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Father Ian laughs _Why I tend to the needs of the village._";
	text2 = "_Mainly providing healing and absolution for those in need._";
	text3 = "_My healing skills are legendary, though I require a small donation of 50 coins._";
	text3 = "_Are you in need of healing?_ he adds.";

begintalknode 32;
	state = 31;
	personality = 237;
	nextstate = -1;
	condition = 1;
	question = "Where are you when you are not here.";
	text1 = "Father Ian answers _I tend to needs in three villages._";
	text2 = "_Cresent Harbor, Asner and Farthest._";
	text3 = "_I can always be found in one of those villages._";
	text4 = "_Since you have found me, do you require healing?_ he adds.";

begintalknode 33;
	state = 31;
	personality = 237;
	nextstate = -1;
	condition = 1;
	question = "What do you know of the she-devil.";
	text1 = "_She's an aberration against all that is right._";
	text2 = "_Fortunately I have avoided her, and likewise, she has avoided me._";

begintalknode 34;
	state = 31;
	personality = 237;
	nextstate = -1;
	condition = 1;
	question = "Can I get some healing (pay 50 coins)?";
	text1 = "Father Ian says _I am sorry, but I have to be firm with the 50 coin donation before performing any healing._";
	text3 = "_Ah, we are blessed, you don't need any healing after all._";
	text5 = "Father Ian places his hand on your head.  You feel your energy and strength returning.  With a flash, you are completely healed.";
	code =
		clear_strings();
		if (coins_amount() < 50) 
			add_string(1);
		else if (run_select_a_pc(1) == 0)
			add_string(3);
		else {
			play_sound(24);
			add_string(5);
			restore_pc(get_selected_pc());
			change_coins(-50);
		}
	break;
